package Threadprojects.pro1_matrix.individual;

public class IndivdualTask implements Runnable {
    final double[][] rs;
    final double[][] m1;
   final double[][] m2;
   final int i;
   final int j;

    public IndivdualTask(double[][] rs, double[][] m1, double[][] m2, int i, int j) {
        this.rs = rs;
        this.m1 = m1;
        this.m2 = m2;
        this.i = i;
        this.j = j;
    }

    @Override
    public void run() {
         rs[i][j] = 0;
        for (int k = 0; k < m1[0].length; k++) {
            rs[i][j] += m1[i][k] * m2[k][j];
        }
    }
}
